feat(notifications): mark-read flows (PR 2/7)#513
Conversation
…markAllRead tests
Matches the pattern in the parallel markRead test and the convention
in agent_docs/rules.md ("Use domain-specific error constants for
entity-specific method tests").
Addresses review comments on PR #513.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
All findings addressed in the latest commit on this branch. Inline reply threads are resolved with commit references. |
35d8ef4 to
32c58a9
Compare
9d136e9 to
0f2e425
Compare
8a4a2a0 to
5b4d11c
Compare
|
Stale class-level JSDoc — still unfixed
This PR ships This was flagged in a prior review but the code hasn't changed — the author's claim that all findings were addressed does not appear to have included this line. |
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
aaaef48 to
5bdbf0a
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
| * `/odata/v1/NotificationEntry` API). | ||
| * |
There was a problem hiding this comment.
The class description was correctly trimmed to remove the stale "mark-read … land in follow-up PRs" sentence, but the first line is still incomplete now that this PR ships the mark-read methods.
| * `/odata/v1/NotificationEntry` API). | |
| * | |
| * Provides inbox operations against the current user's notifications (the | |
| * `/odata/v1/NotificationEntry` API). |
Using the broader "inbox operations" keeps the description accurate through future PRs (delete, etc.) without needing another touch-up.
|
Review summary — 2 findings posted
|
|
rebase with main to pass the #518 | feat(subscriptions): publisher/group updates (6/7) |
|
@sarthak688 I hope you are running these integration tests locally and making sure these are passing with bearer token |
|
FYI @Sarath1018 |
5bdbf0a to
323f6b1
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
323f6b1 to
95b10b2
Compare
|
Review summary — 1 thread unresolved Unresolved: stale class description ( The prior review requested changing |
…llRead) [internal] Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
95b10b2 to
a0128d8
Compare
|
✅ No issues found. Checked for bugs and CLAUDE.md compliance. |
|
vnaren23
left a comment
There was a problem hiding this comment.
Nit: Have claude update the PR description to match AsRead changes.




PR 2/7 in the Notification SDK stack. Stacked on top of #512.
Adds the three mark-read methods on the Notifications service. All hit the same
UpdateReadOData action endpoint;markAllReaduses the server-sideforceAllReadflag.Methods Added
notifications.markAsRead()markRead(tenantId: string, notificationIds: string[]): Promise<NotificationUpdateReadResponse>notifications.markAsUnread()markUnread(tenantId: string, notificationIds: string[]): Promise<NotificationUpdateReadResponse>notifications.markAllAsRead()markAllRead(tenantId: string): Promise<NotificationMarkAllReadResponse>Endpoint Called
markAsRead()/markAsUnread()/markAllAsRead()notificationservice_/notificationserviceapi/odata/v1/NotificationEntry/UiPath.NotificationService.Api.UpdateReadNotificationServicemarkAsReadandmarkAsUnreaddelegate to a privateupdateRead(tenantId, ids, read)helper to share the POST body construction.markAllAsReadsends{ notifications: [], forceAllRead: true }— the server reads all notifications for the acting user regardless of the empty array.@track(...)telemetry decorators.Example Usage
API Response vs SDK Response
These methods don't return entity data — they wrap the API's empty 200 in an
OperationResponse<T>for consistency with other SDK mutation methods:markAsRead/markAsUnread{ success: true, data: { notificationIds, read } }markAllAsRead{ success: true, data: { all: true, read: true } }Sample SDK Response
notifications.markAsRead(tenantId, ['']){ "success": true, "data": { "notificationIds": ["9a3b0db5-9b8b-44a7-9b6a-08de0a17b4e2"], "read": true } }Verification
npm run typechecknpm run lintnpm run test:unitFiles
src/utils/constants/endpoints/notification.ts(UPDATE_READ)src/models/notification/notifications.models.ts(response types + ServiceModel methods)src/services/notification/notifications.ts(methods + privateupdateReadhelper)tests/unit/services/notification/notifications.test.ts(+6 tests)tests/integration/shared/notification/notifications.integration.test.ts(+2 tests)docs/oauth-scopes.mdPR Stack
feat/notifications-sdkfeat/notifications-mark-read(this PR)feat/notifications-deletefeat/subscriptions-sdkfeat/subscriptions-topic-updatesfeat/subscriptions-publisher-updatesfeat/subscriptions-mode-reset🤖 Generated with Claude Code